package com.senlingspace.payment.douyin.bean.request;

import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.senlingspace.payment.douyin.DouyinFunctionEnum;
import com.senlingspace.payment.douyin.bean.response.DouyinCancelVerifyResponse;
import lombok.Data;

/**
 * 撤销核销
 *
 * @author lebronjames
 * @date 2024/07/23
 */
@Data
public class DouyinCancelVerifyRequest implements DouyinRequest<DouyinCancelVerifyResponse> {

    /**
     * 代表一张券码的标识(验券时返回)
     */
    @JsonProperty("certificate_id")
    private String certificateId;

    /**
     * 代表券码一次核销的唯一标识(验券时返回)
     * (次卡撤销多次时请填0)
     */
    @JsonProperty("verify_id")
    private String verifyId;

    @Override
    public DouyinFunctionEnum getFunction() {
        return DouyinFunctionEnum.cancel_verify_ticket;
    }

    @Override
    public String getBody() {
        DouyinCancelVerifyRequest request = new DouyinCancelVerifyRequest();
        request.setCertificateId(this.certificateId);
        request.setVerifyId(this.verifyId);
        return JSON.toJSONString(request);
    }

    @Override
    public Class<DouyinCancelVerifyResponse> getResponseType() {
        return DouyinCancelVerifyResponse.class;
    }

}
